package com.gec.hawaste.controller;


import com.gec.hawaste.service.IExamineService;
import com.gec.hawaste.utils.PageInfo;
import com.gec.hawaste.utils.ResultBean;
import com.gec.hawaste.vo.ExamineVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lisongsong
 * @since 2022-04-21
 */
@RestController
@RequestMapping("manager/examine")
public class ExamineController {
    @Autowired
    private IExamineService iExamineService;
    @RequestMapping(value = "select/{current}/{size}")
    public ResultBean<PageInfo> select(@PathVariable("current") int current,
                                       @PathVariable("size") int size,
                                       @RequestParam Map<String,Object> params)
    {
        PageInfo<ExamineVo> pageInfo = new PageInfo<>(current, size);

        pageInfo = (PageInfo<ExamineVo>) this.iExamineService.selectExamineVoByCondition(pageInfo,params);

        // 设置分页导航条
        pageInfo.setNavigatePage();
        return ResultBean.ok(pageInfo);
    }

}
